<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <link rel="stylesheet" href="./01.css" />
    <style>
        html {
            /* 定义CSS变量 */
            --main-color: #c00000;
        }
        
        .box1,
        .box2 {
            /* background-color: #c00000; */
            background-color: var(--main-color);
        }
        
        .box3 {
            /* color: #c00000; */
            color: var(--main-color);
        }
    </style>
</head>

<body>
    <div class="container1">
        <div class="box1">box1</div>
        <div class="box2">box2</div>
        <div class="box3">box3</div>
    </div>
    <div class="container2">
        <div class="box1">box1</div>
        <div class="box2">box2</div>
        <div class="box3">box3</div>
    </div>
</body>

</html>